package com.isaac.sqlSession;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

public interface SqlSession {
    <E> List<E> selectList(String statementId, Object... params) throws IllegalAccessException, IntrospectionException, InstantiationException, NoSuchFieldException, SQLException, InvocationTargetException, ClassNotFoundException;

    <T> T selectOne(String statementId, Object... params) throws IllegalAccessException, ClassNotFoundException, IntrospectionException, InstantiationException, SQLException, InvocationTargetException, NoSuchFieldException;

    void insertOne(String statementId, Object...params) throws ClassNotFoundException, SQLException, IllegalAccessException, NoSuchFieldException;

    void updateOne(String statementId, Object...params) throws ClassNotFoundException, SQLException, NoSuchFieldException, IllegalAccessException;

    void deleteOne(String statementId, Object...params) throws ClassNotFoundException, SQLException, NoSuchFieldException, IllegalAccessException;

    <T>T getMapper(Class<?> mapperClass);
}
